<template>
	<div class="list-page">
		<tool-bar nav="" title="userDockerfile">
			<el-button @click="add_click()">添加</el-button>
		</tool-bar>
		<my-list
			ref="list"
			url="/dev/user-dockerfile/list"
			@param="preload"
			@loaded="procData"
			:page-size="10"
			:store="true"
			:query="$data.query"
            delete-url="/dev/user-dockerfile/delete/{id}"
		>
      <el-table-column label="name" align="center">
        <template v-slot="scope">
          <div class="link" @click="edit_click(scope.row)">{{ scope.row.name }}</div>
        </template>
      </el-table-column>

			<el-table-column align="center" label="备注" prop="remark"></el-table-column>

			<template #query="scope">
				<kv label="名称">
					<el-input v-model="scope.query.name"></el-input>
				</kv>
			</template>
		</my-list>
	</div>
</template>
<style scoped lang="scss">
</style>
<script setup>
/**
 * Created by CodeGenerator at 2022-09-07 13:53:20
 */





//定义 vue2的this,当前组件
const $self = getCurrentInstance();

//定义 $attrs
const $attrs = useAttrs();



//定义data
const $data = reactive({"query":{}});


const $props = defineProps({

});





const list = ref();

//定义事件
const $emit = defineEmits(["update:modelValue","loaded"]);



const preload = function(param) {
//保存查询条件
//添加查询参数，修改分页参数等。
//param.type = jv.$route.params.type
};
const procData = function(res) {
    res.data.data.forEach(it => {
//如果是组合实体，设置 it.id=...
    });
};
const add_click = function() {
    jv.$router.push("/dev/user-dockerfile/add")
};
const edit_click = function(row) {
//记录上次点击行
    var rowId = row.id;
    list.value.setLastRow(row);
    jv.$router.push("/dev/user-dockerfile/edit/" + rowId)
};

onMounted( function() {
//加载存储的查询条件
} )



</script>